package com.xms.sdk.event;

import com.xms.core.data.Entity;
import com.xms.event.core.IEvent;
import com.xms.event.core.ObjectUpdatingEvent;
import com.xms.schema.entity.Attribute;

import java.util.List;

/**
 * <p>
 * 实体数据更新前事件
 * </p>
 *
 * @author migo
 * @since 2021/9/29
 */
public class EntityUpdatingEvent extends ObjectUpdatingEvent<Entity> implements IEvent
{
    public com.xms.schema.entity.Entity EntityMetadata;
    public List<Attribute> AttributeMetadatas;

    public EntityUpdatingEvent(Entity $origin, Entity $updated) {
        super($origin, $updated);
    }

    public EntityUpdatingEvent(Entity $origin, Entity $updated,
                               com.xms.schema.entity.Entity $entityMetadata,
                               List<Attribute> $attributeMetadatas) {
        super($origin, $updated);
        this.EntityMetadata = $entityMetadata;
        this.AttributeMetadatas = $attributeMetadatas;
    }
}
